<?php
namespace Home\Controller;
use Think\Controller;
class JoinUsController extends Controller {
    public function index(){
    	// banner
    	$banner=M('banner');
        $bannerlist=$banner->select();
        $this->assign("bannerlist",$bannerlist);
        // join
        $joinus=M('joinus');
        $joinuslist1=$joinus->where("type=1")->order('time desc')->limit(1)->select();
        $joinuslist2=$joinus->where("type=2")->order('time desc')->limit(1)->select();
        $joinuslist3=$joinus->where("type=3")->order('time desc')->limit(1)->select();
        $joinuslist4=$joinus->where("type=4")->order('time desc')->limit(1)->select();
        $joinuslist5=$joinus->where("type=5")->order('time desc')->limit(1)->select();
        $this->assign("joinuslist1",$joinuslist1[0]);
        $this->assign("joinuslist2",$joinuslist2[0]);
        $this->assign("joinuslist3",$joinuslist3[0]);
        $this->assign("joinuslist4",$joinuslist4[0]);
        $this->assign("joinuslist5",$joinuslist5[0]);
        $this->display();
    }
}